﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace Week1.world.behavior
{
    /// <summary>
    /// This class registers a game object into the grid.
    /// </summary>
    class BehaviorGridRegister : BehaviorBase
    {
        private static BehaviorGridRegister oInstance;

        private world.terrain.GameGrid oGrid;

        /// <summary>
        /// Constructor is private as this is a singleton class
        /// </summary>
        private BehaviorGridRegister()
            : base()
        {
            oGrid = world.terrain.GameGrid.Instance;
        }

        /// <summary>
        /// Return a single instance of this object
        /// </summary>
        /// <returns></returns>
        public static BehaviorGridRegister Instance
        {
            get
            {
                if (oInstance == null)
                    oInstance = new BehaviorGridRegister();

                return oInstance;
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="handlerid"></param>
        /// <param name="oVars"></param>
        public override void execute(int handlerid, DrawableGlobalVar oVars, GameTime gameTime)
        {
            //oGrid.registerObject(oVars);
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="handlerid"></param>
        /// <param name="oVars"></param>
        public override void initialize(int handlerid, DrawableGlobalVar oVars)
        {
        }
    }
}
